package com.example.demoes01.controller;

import com.example.demoes01.service.EsIndexService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/esIndex")
public class EsIndexController {

    @Autowired
    private EsIndexService esIndexService;
    /**
     * 根据索引名称查询索引是否存在
     *
     * @return
     */
    @GetMapping("/indexExit")
    public Boolean indexExit(String indexName) {

        return esIndexService.indexExit(indexName);
    }

}
